﻿package Gameplay
{	
	import flash.display.Sprite;

	public class TrackStrip
	{
		private var FMarks: Vector.<Mark>;
		private var FID:int;
		private var FCurentMarkID:int;
		
		public function TrackStrip(AID:int):void 
		{			
			FID = AID;
			FMarks = new Vector.<Mark>();
		}
		
		public function Add(AMark: Mark):void
		{
			AMark.ID = FMarks.push(AMark)-1;
			AMark.Strip = this;
			FCurentMarkID = AMark.ID;
		}
		
		public function StepID():void
		{			
			FCurentMarkID--;
		}
		
		public function CheckNear():Boolean
		{
			if(FCurentMarkID >= 0)
				return FMarks[FCurentMarkID].CheckHit();
			else
				return false;
		}
		
		public function get ID():int
		{
			return FID;
		}
		
		public function get CurrentID():int
		{
			return FCurentMarkID;
		}
	}	
}
